wayland: Make virtual modifier mapping more similar to X
authorMatthias Clasen <mclasen@redhat.com>
Sun, 17 Apr 2016 05:50:23 +0000 (01:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 17 Apr 2016 05:50:23 +0000 (01:50 -0400)
Ignore virtual modifiers that are mapped to Mod1 (as Meta
often is), to avoid interfering with our fix interpretation
of Mod1 as Alt.

gdk/wayland/gdkkeys-wayland.c

index eee2907649e193e83b8a58b7da9231028c650a48..2616df41866046ec7bca932264f431789afb2b28 100644 (file)
@@ -398,7 +398,7 @@ gdk_wayland_keymap_add_virtual_modifiers (GdkKeymap       *keymap,
 
       xkb_state_update_mask (xkb_state, 1 << idx, 0, 0, 0, 0, 0);
       real = xkb_state_serialize_mods (xkb_state, XKB_STATE_MODS_EFFECTIVE);
-      real &= 0xff;
+      real &= 0xf0; /* ignore mapping to Lock, Shift, Control, Mod1 */
       if (mods & real)
         *state |= vmods[i].mask;
       xkb_state_update_mask (xkb_state, 0, 0, 0, 0, 0, 0);